* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.navbar {
    background-color: #4285f4;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.ranking-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ranking-header h1 {
    color: #4285f4;
    margin-bottom: 0.5rem;
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    position: relative;
}

.tab-btn.active {
    color: #4285f4;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #4285f4;
}

.ranking-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.rank-number {
    width: 40px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #555;
    text-align: center;
}

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    font-weight: bold;
    color: #555;
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: 500;
}

.rank-score {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.rank-badge {
    margin-left: 1rem;
    padding: 0.2rem 0.5rem;
    background-color: #ffeb3b;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
}

.user-stats {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.stat-card {
    text-align: center;
    padding: 0 1.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4285f4;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.loader {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #f44336;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3367d6;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .rank-item {
        padding: 0.8rem 1rem;
    }

    .user-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
